1 //+-----------------------------------------------------------------------
3 // Copyright (c) Microsoft Corporation. All rights reserved.
6 // Defines the ErrorPage class of PresentationHost.
12 // Ported Windows->DevDiv. See SourcesHistory.txt.
14 //------------------------------------------------------------------------
21 // Display() returns only if called on the main thread and the browser is currently blocked.
22 static void Display(__in_ecount(1) BSTR pErrorMsg
);
23 static bool IsActive() { return s_fIsActive
!= 0; }
25 static void SetRect(int x
, int y
, int width
, int height
);
26 static bool ExecOleCommand(__in_opt
const GUID
* pguidCmdGroup
, DWORD dwCmdId
, DWORD
/*nCmdExecOpt*/,
27 __in_opt VARIANT
* /*pvarArgIn*/, __out_opt VARIANT
* /*pvarArgOut*/);
29 static HRESULT
RestartApplication();
32 __declspec(align(4)) static volatile LONG s_fIsActive
;
33 static DWORD s_threadId
;
34 static HWND s_hWnd
, s_hRBW
;
36 static void DisplayOnAnyThread(__in_ecount(1) BSTR pErrorMsg
);
37 static HRESULT
LoadAndFixUpHtmlTemplate(__out _bstr_t
&htmlTemplate
);
38 static bool GetShowDetailsRegistryFlag();
39 static void DisableTextAreaCloseTag(__inout
wchar_t *str
);
40 static _bstr_t
ListLoadedModules();
42 static HRESULT
SetUpHostWindow();
43 static LRESULT
WndProc(HWND hwnd
, UINT msg
, WPARAM wParam
, LPARAM lParam
);